const mysql =require("mysql");

var con = mysql.createConnection({
    host: '192.168.16.144',
    port: 3306,
    user: 'root',
    password:'ddd',
    database: 'dataexercise'
})

var selectSql = "select chapterTitle,content,timer,views from chapters"

con.query(selectSql,[chapterTitle,content,timer,views],(err,result)=>{
    if(err){
        console.log(err)
    }else{
        console.log(result)
    }
})